﻿@page
@model IndexModel
@{
    dynamic dict = Locale.GetDictionary(Model.GetType().FullName);
    ViewBag.Title = dict.PageTitle;
}

<nav class="navbar sticky-top navbar-expand-lg bg-dark" data-bs-theme="dark">
    <div class="container-xxl">
        <a class="navbar-brand mb-0 h1" asp-page="/Index">@dict.PageTitle</a>
    </div>
</nav>

<div class="container-xxl mt-3">
    <form method="post">
        @if (Model.HasError)
        {
            <div class="alert alert-danger alert-dismissible" role="alert">
                <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
                <div>@Model.ErrorMessage</div>
            </div>
        }
        <div class="card mb-3">
            <h5 class="card-header">@dict.OpenSchemeHeader</h5>
            <div class="card-body">
                <div class="input-group">
                    <input type="text" id="txtFileName" class="form-control" placeholder="@dict.txtFileName_Placeholder" required asp-for="FileName">
                    <button type="submit" id="btnOpenScheme" class="btn btn-primary">@dict.btnOpenScheme</button>
                </div>
            </div>
        </div>
    </form>

    <h4>@dict.ActiveSchemesHeader</h4>

    <div class="card mb-3">
        <h5 class="card-header">C:\SCADA\Projects\HelloWorld\HelloWorld.rsproj</h5>
        <div class="list-group list-group-flush">
            <a href="#" class="list-group-item list-group-item-action">C:\SCADA\Projects\HelloWorldTest\Views\HelloWorld\PopupScheme.sch</a>
            <a href="#" class="list-group-item list-group-item-action">C:\SCADA\Projects\HelloWorldTest\Views\HelloWorld\TestScheme.sch</a>
            <a href="#" class="list-group-item list-group-item-action">C:\SCADA\Projects\HelloWorldTest\Views\HelloWorld\SomeScheme.sch</a>
        </div>
    </div>

    <div class="card mb-3">
        <h5 class="card-header">C:\SCADA\Projects\RapidGateTest\RapidGateTest.rsproj</h5>
        <div class="list-group list-group-flush">
            <a href="#" class="list-group-item list-group-item-action">C:\SCADA\Projects\RapidGateTest\Views\HelloWorld\Replication.sch</a>
            <a href="#" class="list-group-item list-group-item-action">C:\SCADA\Projects\RapidGateTest\Views\HelloWorld\Simulator.sch</a>
        </div>
    </div>
</div>
